home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / AOCE folder / OCEMail.lisp < prev    next >
Encoding:
Text File  |  1994-09-12  |  56.1 KB  |  1,660 lines  |  [TEXT/CCL2]

  1.  
  2. (in-package :TRAPS)             ; ***********************************************************
  3. ; Created: Tuesday, August 17, 1993 4:37:24 PM
  4. ;  OCEMail.p
  5. ;  Pascal Interface to the Macintosh Libraries
  6. ;   Copyright Apple Computer, Inc. 1990-1993
  7. ;   All rights reserved
  8. ; ***********************************************************
  9.  
  10. ; $IFC UNDEFINED UsingIncludes
  11. ; $SETC UsingIncludes:= 0
  12. ; $ENDC
  13.  
  14. ; $IFC NOT UsingIncludes
  15.  
  16. ; $ENDC
  17.  
  18. ; $IFC UNDEFINED UsingOCEMail
  19. ; $SETC UsingOCEMail:= 1
  20.  
  21. ; $I+
  22. ; $SETC OCEMailIncludes:= UsingIncludes
  23. ; $SETC UsingIncludes:= 1
  24.  
  25. ; $IFC UNDEFINED UsingDigitalSignature
  26. ; $I DigitalSignature.p
  27. ; $ENDC
  28.  
  29. ; $IFC UNDEFINED UsingFiles
  30.  
  31. (require-interface 'FILES)      ; $I $$Shell(PInterfaces)Files.p
  32. ; $ENDC
  33.  
  34. ; $IFC UNDEFINED UsingMemory
  35.  
  36. (require-interface 'MEMORY)     ; $I $$Shell(PInterfaces)Memory.p
  37. ; $ENDC
  38.  
  39. ; $IFC UNDEFINED UsingOCE
  40. ; $I OCE.p
  41. ; $ENDC
  42.  
  43. ; $IFC UNDEFINED UsingOCEAuthDir
  44. ; $I OCEAuthDir.p
  45. ; $ENDC
  46.  
  47. ; $IFC UNDEFINED UsingOCEMessaging
  48. ; $I OCEMessaging.p
  49. ; $ENDC
  50.  
  51. ; $IFC UNDEFINED UsingTextEdit
  52.  
  53. (require-interface 'TEXTEDIT)   ; $I $$Shell(PInterfaces)TextEdit.p
  54. ; $ENDC
  55.  
  56. ; $IFC UNDEFINED UsingTypes
  57.  
  58. (require-interface 'TYPES)      ; $I $$Shell(PInterfaces)Types.p
  59. ; $ENDC
  60.  
  61. ; $SETC UsingIncludes:= OCEMailIncludes
  62.  
  63. ; ************************************************************************************
  64. ;  Common Definitions 
  65. ; ************************************************************************************
  66.  
  67. (defrecord MailParamBlockHeader 
  68.    (qLink :POINTER)
  69.    (reservedH1 :SIGNED-LONG)
  70.    (reservedH2 :SIGNED-LONG)
  71.    (ioCompletion :POINTER)
  72.    (ioResult :SIGNED-INTEGER)
  73.    (saveA5 :SIGNED-LONG)
  74.    (reqCode :SIGNED-INTEGER)
  75.    )
  76.  
  77. (def-mactype :MAILMSGREF (find-mactype :SIGNED-LONG));  reference to a new or open letter or message 
  78.  
  79. (def-mactype :MSAMQUEUEREF (find-mactype :SIGNED-LONG));  reference to an open msam queue 
  80. (def-mactype :MSAMSLOTID (find-mactype :SIGNED-INTEGER));  identifies slots managed by a PMSAM 
  81.  
  82. (def-mactype :MAILBOXREF (find-mactype :SIGNED-LONG));  reference to an active mailbox 
  83. (def-mactype :MAILSLOTID (find-mactype :SIGNED-INTEGER));  identifies slots within a mailbox 
  84.  
  85. (defrecord MailSeqNum           ;  identifies a letter in a mailbox 
  86.    (slotID :SIGNED-INTEGER)
  87.    (seqNum :SIGNED-LONG)
  88.    )
  89.  
  90. ;  A MailBuffer is used to describe a buffer used for an IO operation.
  91. ; The location of the buffer is pointed to by 'buffer'.
  92. ; When reading, the size of the buffer is 'bufferSize'
  93. ; and the size of data actually read is 'dataSize'.
  94. ; When writing, the size of data to be written is 'bufferSize'
  95. ; and the size of data actually written is 'dataSize'.
  96.  
  97. (defrecord MailBuffer 
  98.    (bufferSize :SIGNED-LONG)
  99.    (buffer :POINTER)
  100.    (dataSize :SIGNED-LONG)
  101.    )
  102.  
  103. ;  A MailReply is used to describe a commonly used reply buffer format.
  104. ; It contains a count of tuples followed by an array of tuples.
  105. ; The format of the tuple itself depends on each particular call.
  106. (defrecord MailReply 
  107.    (tupleCount :SIGNED-INTEGER)
  108. ;  tuple[1..tupleCount] 
  109.    )
  110.  
  111. ;  Shared Memory Communication Area used when Mail Manager sends
  112. ; High Level Events to a PMSAM.
  113. (defrecord SMCA 
  114.    (smcaLength :SIGNED-INTEGER) ;  includes size of length field 
  115.    (result :SIGNED-INTEGER)
  116.    (userBytes :SIGNED-LONG)
  117.    (:variant 
  118.       ((slotCID :CREATIONID))   ;  may not be used in some cases 
  119.       ((msgHint :SIGNED-LONG))
  120.       ))
  121.  
  122. ; ************************************************************************************
  123.  
  124. ;  Value of creator and types fields for messages and blocks defined by MailManager 
  125. (defconstant $kMailAppleMailCreator :|apml|);  message and letter block creator 
  126.  
  127. (defconstant $kMailLtrMsgType :|lttr|);  msg type of letters, reports 
  128. (defconstant $kMailLtrHdrType :|lthd|);  contains letter header 
  129. (defconstant $kMailContentType :|body|);  contains content of letter 
  130. (defconstant $kMailEnclosureListType :|elst|);  contains list of enclosures 
  131. (defconstant $kMailEnclosureDesktopType :|edsk|);  contains desktop mgr info for enclosures 
  132.  
  133. (defconstant $kMailEnclosureFileType :|asgl|);  contains a file enclosure 
  134. ;  format is defined by AppleSingle 
  135.  
  136. (defconstant $kMailImageBodyType :|imag|);  contains image of letter 
  137. ;         format is struct TPfPgDir         - in Printing.h
  138. ;         TPfPgDir = RECORD
  139. ;             pageCount: INTEGER;            - number of pages in the image.
  140. ;             iPgPos: LONGINT[1..129];    - iPgPos[n] is the offset from the start of the block
  141. ;             END;
  142. ;                                         - to image of page n.
  143. ;                                         - iPgPos[n+1] - iPgPos[n] is the length of page n.
  144.  
  145. (defconstant $kMailMSAMType :|gwyi|);  contains msam specific information 
  146.  
  147. (defconstant $kMailTunnelLtrType :|tunl|);  used to read a tunnelled message 
  148. (defconstant $kMailHopInfoType :|hopi|);  used to read hopInfo for a tunnelled message 
  149.  
  150. (defconstant $kMailReportType :|rpti|);  contains report info 
  151. ; Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  152. ; This block has a header, IPMReportBlockHeader,
  153. ; followed by an array of elements, each of type IPMRecipientReport
  154.  
  155. ;  Various families used by mail or related msgs 
  156. (defconstant $kMailFamily :|mail|);  Defines family of "mail" msgs: content, header, etc 
  157. (defconstant $kMailFamilyFile :|file|);  Defines family of "direct display" msgs 
  158.  
  159. ; ************************************************************************************
  160.  
  161. (def-mactype :MAILATTRIBUTEID (find-mactype :SIGNED-INTEGER))
  162.  
  163. ;  Values of MailAttributeID 
  164. ;  Message store attributes - stored in the catalog 
  165. ;  Will always be present in a letter and have fixed sizes 
  166. (defconstant $kMailLetterFlagsBit 1);  MailLetterFlags 
  167.  
  168. ;  Letter attributes - stored in the letter 
  169. ;  Will always be present in a letter and have fixed sizes 
  170. (defconstant $kMailIndicationsBit 3);  MailIndications 
  171. (defconstant $kMailMsgTypeBit 4);  OCECreatorType 
  172. (defconstant $kMailLetterIDBit 5);  MailLetterID 
  173. (defconstant $kMailSendTimeStampBit 6);  MailTime 
  174. (defconstant $kMailNestingLevelBit 7);  MailNestingLevel 
  175. (defconstant $kMailMsgFamilyBit 8);  OSType 
  176.  
  177. ;  Letter attributes - stored in the letter 
  178. ;  May be present in a letter and have fixed sizes 
  179. (defconstant $kMailReplyIDBit 9);  MailLetterID 
  180. (defconstant $kMailConversationIDBit 10);  MailLetterID 
  181.  
  182. ;  Letter attributes - stored in the letter 
  183. ;  May be present in a letter and have variable length sizes 
  184. (defconstant $kMailSubjectBit 11);  RString 
  185. (defconstant $kMailFromBit 12)  ;  MailRecipient 
  186. (defconstant $kMailToBit 13)    ;  MailRecipient 
  187. (defconstant $kMailCcBit 14)    ;  MailRecipient 
  188. (defconstant $kMailBccBit 15)   ;  MailRecipient 
  189.  
  190. (def-mactype :MAILATTRIBUTEMASK (find-mactype :SIGNED-LONG))
  191.  
  192. ;  Values of MailAttributeMask 
  193. (defconstant $kMailLetterFlagsMask #X1); 1<<(kMailLetterFlagsBit-1)
  194. (defconstant $kMailIndicationsMask #X4); 1<<(kMailIndicationsBit-1)
  195. (defconstant $kMailMsgTypeMask #X8); 1<<(kMailMsgTypeBit-1)
  196. (defconstant $kMailLetterIDMask #X10); 1<<(kMailLetterIDBit-1)
  197. (defconstant $kMailSendTimeStampMask #X20); 1<<(kMailSendTimeStampBit-1)
  198. (defconstant $kMailNestingLevelMask #X40); 1<<(kMailNestingLevelBit-1)
  199. (defconstant $kMailMsgFamilyMask #X80); 1<<(kMailMsgFamilyBit-1)
  200. (defconstant $kMailReplyIDMask #X100); 1<<(kMailReplyIDBit-1)
  201. (defconstant $kMailConversationIDMask #X200); 1<<(kMailConversationIDBit-1)
  202. (defconstant $kMailSubjectMask #X400); 1<<(kMailSubjectBit-1)
  203. (defconstant $kMailFromMask #X800); 1<<(kMailFromBit-1)
  204. (defconstant $kMailToMask #X1000); 1<<(kMailToBit-1)
  205. (defconstant $kMailCcMask #X2000); 1<<(kMailCcBit-1)
  206. (defconstant $kMailBccMask #X4000); 1<<(kMailBccBit-1)
  207.  
  208. (defrecord MailAttributeBitmap 
  209.    (reservedA :UNSIGNED-INTEGER);  16 bits 
  210.    (reservedB :UNSIGNED-INTEGER)
  211.    (bcc :UNSIGNED-INTEGER)      ;  BOOLEAN 
  212.    (cc :UNSIGNED-INTEGER)       ;  BOOLEAN 
  213.    (toRecipient :UNSIGNED-INTEGER);  BOOLEAN 
  214.    (from :UNSIGNED-INTEGER)     ;  BOOLEAN 
  215.    (subject :UNSIGNED-INTEGER)  ;  BOOLEAN 
  216.    (conversationID :UNSIGNED-INTEGER);  BOOLEAN 
  217.    (replyID :UNSIGNED-INTEGER)  ;  BOOLEAN 
  218.    (msgFamily :UNSIGNED-INTEGER);  BOOLEAN 
  219.    (nestingLevel :UNSIGNED-INTEGER);  BOOLEAN 
  220.    (sendTimeStamp :UNSIGNED-INTEGER);  BOOLEAN 
  221.    (letterID :UNSIGNED-INTEGER) ;  BOOLEAN 
  222.    (msgType :UNSIGNED-INTEGER)  ;  BOOLEAN 
  223.    (indications :UNSIGNED-INTEGER);  BOOLEAN 
  224.    (reservedC :UNSIGNED-INTEGER);  BOOLEAN 
  225.    (letterFlags :UNSIGNED-INTEGER);  BOOLEAN 
  226.    )
  227.  
  228. ; ************************************************************************************
  229. (def-mactype :MAILLETTERSYSTEMFLAGS (find-mactype :SIGNED-INTEGER))
  230.  
  231. ;  Values of MailLetterSystemFlags 
  232. (defconstant $kMailIsLocalBit 2);  letter is available locally (either by nature or via cache) 
  233.  
  234. (defconstant $kMailIsLocalMask #X4); 1<<kMailIsLocalBit
  235.  
  236. (def-mactype :MAILLETTERUSERFLAGS (find-mactype :SIGNED-INTEGER))
  237.  
  238. (defconstant $kMailReadBit 0)   ;  this letter has been opened 
  239. (defconstant $kMailDontArchiveBit 1);  this letter is not 
  240. ;  to be archived either because 
  241. ;  it has already been archived or 
  242. ;  it should not be archived. 
  243. (defconstant $kMailInTrashBit 2);  this letter is in trash 
  244.  
  245. ;  Values of MailLetterUserFlags 
  246. (defconstant $kMailReadMask #X1); 1<<kMailReadBit
  247. (defconstant $kMailDontArchiveMask #X2); 1<<kMailDontArchiveBit
  248. (defconstant $kMailInTrashMask #X4); 1<<kMailInTrashBit
  249.  
  250. (defrecord MailLetterFlags 
  251.    (sysFlags :SIGNED-INTEGER)
  252.    (userFlags :SIGNED-INTEGER)
  253.    )
  254.  
  255. (defrecord MailMaskedLetterFlags 
  256.    (flagMask :MAILLETTERFLAGS)  ;  flags that are to be set 
  257.    (flagValues :MAILLETTERFLAGS);  and their values 
  258.    )
  259.  
  260. (defconstant $kMailOriginalInReportBit 1)
  261. (defconstant $kMailNonReceiptReportsBit 3)
  262. (defconstant $kMailReceiptReportsBit 4)
  263. (defconstant $kMailForwardedBit 5)
  264. (defconstant $kMailPriorityBit 6)
  265. (defconstant $kMailIsReportWithOriginalBit 8)
  266. (defconstant $kMailIsReportBit 9)
  267. (defconstant $kMailHasContentBit 10)
  268. (defconstant $kMailHasSignatureBit 11)
  269. (defconstant $kMailAuthenticatedBit 12)
  270. (defconstant $kMailSentBit 13)
  271.  
  272. ;  Values of MailIndications 
  273. (defconstant $kMailSentMask #X1000); 1<<(kMailSentBit-1)
  274. (defconstant $kMailAuthenticatedMask #X800); 1<<(kMailAuthenticatedBit-1)
  275. (defconstant $kMailHasSignatureMask #X400); 1<<(kMailHasSignatureBit-1)
  276. (defconstant $kMailHasContentMask #X200); 1<<(kMailHasContentBit-1)
  277. (defconstant $kMailIsReportMask #X100); 1<<(kMailIsReportBit-1)
  278. (defconstant $kMailIsReportWithOriginalMask #X80); 1<<(kMailIsReportWithOriginalBit-1)
  279. (defconstant $kMailPriorityMask #X60); 3<<(kMailPriorityBit-1)
  280. (defconstant $kMailForwardedMask #X10); 1<<(kMailForwardedBit-1)
  281. (defconstant $kMailReceiptReportsMask #X8); 1<<(kMailReceiptReportsBit-1)
  282. (defconstant $kMailNonReceiptReportsMask #X4); 1<<(kMailNonReceiptReportsBit-1)
  283. (defconstant $kMailOriginalInReportMask #X3); 3<<kMailOriginalInReportBit-1)
  284.  
  285. (defrecord MailIndications 
  286.    (reservedB :UNSIGNED-INTEGER);  16 bits 
  287.    (hasStandardContent :UNSIGNED-INTEGER);  this letter has standard interchange content 
  288.    (hasImageContent :UNSIGNED-INTEGER);  this letter has a standard image 
  289.    (hasNativeContent :UNSIGNED-INTEGER);  this letter has a main enclosure 
  290.    (sent :UNSIGNED-INTEGER)     ;  this letter was sent, not just composed 
  291.    (authenticated :UNSIGNED-INTEGER);  this letter was created and transported with authentication 
  292.    (hasSignature :UNSIGNED-INTEGER);  this letter was signed with a digital signature 
  293.    (hasContent :UNSIGNED-INTEGER);  this letter has content 
  294.    (isReport :UNSIGNED-INTEGER) ;  this letter is really a report 
  295.    (isReportWithOriginal :UNSIGNED-INTEGER);  this report contains the original letter 
  296.  
  297.    (priority :UNSIGNED-INTEGER) ;  Bits defined as in IPMPriority 
  298. ;  the originator has: 
  299.    (forwarded :UNSIGNED-INTEGER);         forwarded this letter 
  300.  
  301. ;  the originator requests: 
  302.    (receiptReports :UNSIGNED-INTEGER);         delivery reports 
  303.    (nonReceiptReports :UNSIGNED-INTEGER);         non-delivery reports 
  304.    (originalInReport :UNSIGNED-INTEGER);         original letter to be enclosed in reports 
  305.    )
  306.  
  307. ;  values of the field originalInReport in MailIndications 
  308. (defconstant $kMailNoOriginal 0);  do not enclose original in reports 
  309. (defconstant $kMailEncloseOnNonReceipt 3);  enclose original in non-delivery reports 
  310.  
  311. (def-mactype :MAILLETTERID (find-mactype :IPMMSGID))
  312.  
  313. (defrecord MailTime 
  314.    (time :SIGNED-LONG)          ;  current UTC(GMT) time 
  315.    (offset :SIGNED-LONG)        ;  offset from GMT 
  316.    )
  317.  
  318. (def-mactype :MAILNESTINGLEVEL (find-mactype :SIGNED-INTEGER));  innermost letter has nestingLevel 0 
  319.  
  320. (def-mactype :MAILRECIPIENT (find-mactype :OCERECIPIENT))
  321.  
  322. ; ************************************************************************************
  323.  
  324. (defconstant $kMailTextSegmentBit 0)
  325. (defconstant $kMailPictSegmentBit 1)
  326. (defconstant $kMailSoundSegmentBit 2)
  327. (defconstant $kMailStyledTextSegmentBit 3)
  328. (defconstant $kMailMovieSegmentBit 4)
  329.  
  330. (def-mactype :MAILSEGMENTMASK (find-mactype :SIGNED-INTEGER))
  331.  
  332. ;  Values of MailSegmentMask 
  333. (defconstant $kMailTextSegmentMask #X1); 1<<kMailTextSegmentBit
  334. (defconstant $kMailPictSegmentMask #X2); 1<<kMailPictSegmentBit
  335. (defconstant $kMailSoundSegmentMask #X4); 1<<kMailSoundSegmentBit
  336. (defconstant $kMailStyledTextSegmentMask #X8); 1<<kMailStyledTextSegmentBit
  337. (defconstant $kMailMovieSegmentMask #X10); 1<<kMailMovieSegmentBit
  338.  
  339. (def-mactype :MAILSEGMENTTYPE (find-mactype :SIGNED-INTEGER))
  340.  
  341. ;  Values of MailSegmentType 
  342. (defconstant $kMailInvalidSegmentType 0)
  343. (defconstant $kMailTextSegmentType 1)
  344. (defconstant $kMailPictSegmentType 2)
  345. (defconstant $kMailSoundSegmentType 3)
  346. (defconstant $kMailStyledTextSegmentType 4)
  347. (defconstant $kMailMovieSegmentType 5)
  348.  
  349. ; ************************************************************************************
  350. (defconstant $kMailErrorLogEntryVersion #X101)
  351. (defconstant $kMailMSAMErrorStringListID 128);  These 'STR#' resources should be 
  352. (defconstant $kMailMSAMActionStringListID 129);  in the PMSAM resource fork 
  353.  
  354. (def-mactype :MAILLOGERRORTYPE (find-mactype :SIGNED-INTEGER))
  355.  
  356. ;  Values of MailLogErrorType 
  357. (defconstant $kMailELECorrectable 0)
  358. (defconstant $kMailELEError 1)
  359. (defconstant $kMailELEWarning 2)
  360. (defconstant $kMailELEInformational 3)
  361.  
  362. (def-mactype :MAILLOGERRORCODE (find-mactype :SIGNED-INTEGER))
  363.  
  364. ;  Values of MailLogErrorCode 
  365. ;  positive codes are indices into 
  366. ;  PMSAM defined STRINGs 
  367. (defconstant $kMailMSAMErrorCode 0)
  368. (defconstant $kMailMiscError -1);  negative codes are OCE defined 
  369. (defconstant $kMailNoModem -2)  ;  modem required, but missing 
  370.  
  371. (defrecord MailErrorLogEntryInfo ;  < 128 bytes 
  372.    (version :SIGNED-INTEGER)
  373.    (timeOccurred :SIGNED-LONG)  ;  do not fill in 
  374.    (reportingPMSAM (:STRING 31));  do not fill in 
  375.    (reportingMSAMSlot (:STRING 31));  do not fill in 
  376.    (errorType :SIGNED-INTEGER)
  377.    (errorCode :SIGNED-INTEGER)
  378.    (errorResource :SIGNED-INTEGER);  resources are valid if 
  379.    (actionResource :SIGNED-INTEGER);  errorCode = kMailMSAMErrorCode 
  380. ;  index starts from 1 
  381.    (filler :SIGNED-LONG)
  382.    (filler2 :SIGNED-INTEGER)
  383.    )
  384.  
  385. ; ************************************************************************************
  386. (def-mactype :MAILBLOCKMODE (find-mactype :SIGNED-INTEGER))
  387.  
  388. ;  Values of MailBlockMode 
  389. (defconstant $kMailFromStart 1) ;  write data from offset calculated from 
  390. (defconstant $kMailFromLEOB 2)  ;  start of block, end of block, 
  391. (defconstant $kMailFromMark 3)  ;  or from the current mark 
  392.  
  393. (defrecord MailEnclosureInfo 
  394.    (enclosureName (:POINTER (:STRING 255)))
  395.    (catInfo :CINFOPBPTR)
  396.    (comment (:POINTER (:STRING 255)))
  397.    (icon :POINTER)
  398.    )
  399.  
  400. ; ************************************************************************************
  401.  
  402. (defconstant $kOCESetupLocationNone 0);  disconnect state 
  403. (defconstant $kOCESetupLocationMax 8);  maximum location value 
  404.  
  405. (def-mactype :OCESETUPLOCATION (find-mactype :UNSIGNED-BYTE))
  406.  
  407. ;  location state is a bitmask, 0x1=>1st location active, 
  408. ;   0x2 => 2nd, 0x4 => 3rd, etc.
  409.  
  410. ; #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  411.  
  412. (def-mactype :MAILLOCATIONFLAGS (find-mactype :UNSIGNED-BYTE))
  413.  
  414. (defrecord MailLocationInfo 
  415.  
  416. ; ERROR!! Record field LOCATION declared Non-PACKED BYTE !
  417.    (location :UNSIGNED-BYTE)
  418.  
  419. ; ERROR!! Record field ACTIVE declared Non-PACKED BYTE !
  420.    (active :UNSIGNED-BYTE)
  421.    )
  422.  
  423. ; ************************************************************************************
  424. ;  Definitions for Personal MSAMs 
  425. ; ************************************************************************************
  426.  
  427. (defconstant $kMailEPPCMsgVersion 3)
  428.  
  429. (defrecord MailEPPCMsg 
  430.    (version :SIGNED-INTEGER)
  431.    (:variant 
  432.       ((theSMCA (:POINTER :SMCA)));  for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' 
  433.       ((sequenceNumber :SIGNED-LONG));  for 'inqu', 'dlom' 
  434.       ((locationInfo :MAILLOCATIONINFO));  for 'locc' 
  435.       ))
  436.  
  437. ;  Values of OCE defined High Level Event message classes 
  438. (defconstant $kMailEPPCCreateSlot :|crsl|)
  439. (defconstant $kMailEPPCModifySlot :|mdsl|)
  440. (defconstant $kMailEPPCDeleteSlot :|dlsl|)
  441. (defconstant $kMailEPPCShutDown :|quit|)
  442. (defconstant $kMailEPPCMailboxOpened :|mbop|)
  443. (defconstant $kMailEPPCMailboxClosed :|mbcl|)
  444. (defconstant $kMailEPPCMsgPending :|msgp|)
  445. (defconstant $kMailEPPCSendImmediate :|sndi|)
  446. (defconstant $kMailEPPCContinue :|cont|)
  447. (defconstant $kMailEPPCSchedule :|sked|)
  448. (defconstant $kMailEPPCAdmin :|admn|)
  449. (defconstant $kMailEPPCInQUpdate :|inqu|)
  450. (defconstant $kMailEPPCMsgOpened :|msgo|)
  451. (defconstant $kMailEPPCDeleteOutQMsg :|dlom|)
  452. (defconstant $kMailEPPCWakeup :|wkup|)
  453. (defconstant $kMailEPPCLocationChanged :|locc|)
  454.  
  455. (defrecord MailTimer 
  456.    (:variant 
  457.       ((frequency :SIGNED-LONG));  how often to connect (secs) 
  458.       ((connectTime :SIGNED-LONG));  time since midnight (secs) 
  459.       ))
  460.  
  461. (defconstant $kMailTimerOff 0)  ;  control is off 
  462. (defconstant $kMailTimerTime 1) ;  specifies connect time (relative to midnight) 
  463. (defconstant $kMailTimerFrequency 2);  specifies connect frequency 
  464.  
  465. (def-mactype :MAILTIMERKIND (find-mactype :UNSIGNED-BYTE))
  466.  
  467. (defrecord MailTimers 
  468.    (sendTimeKind :UNSIGNED-BYTE);  either kMailTimerTime or kMailTimerFrequency 
  469.    (receiveTimeKind :UNSIGNED-BYTE);  either kMailTimerTime or kMailTimerFrequency 
  470.    (send :MAILTIMER)
  471.    (receive :MAILTIMER)
  472.    )
  473.  
  474. (defrecord MailStandardSlotInfoAttribute 
  475.    (version :SIGNED-INTEGER)
  476.    (active :UNSIGNED-BYTE)      ;  active if MailLocationMask(i) is set 
  477.    (padByte :UNSIGNED-BYTE)
  478.    (sendReceiveTimer :MAILTIMERS)
  479.    )
  480.  
  481. (defrecord PMSAMGetMSAMRecordPB 
  482.    (qLink :POINTER)
  483.    (reservedH1 :SIGNED-LONG)
  484.    (reservedH2 :SIGNED-LONG)
  485.    (ioCompletion :POINTER)
  486.    (ioResult :SIGNED-INTEGER)
  487.    (saveA5 :SIGNED-LONG)
  488.    (reqCode :SIGNED-INTEGER)
  489.  
  490.    (msamCID :CREATIONID)
  491.    )
  492.  
  493. (defrecord PMSAMOpenQueuesPB 
  494.    (qLink :POINTER)
  495.    (reservedH1 :SIGNED-LONG)
  496.    (reservedH2 :SIGNED-LONG)
  497.    (ioCompletion :POINTER)
  498.    (ioResult :SIGNED-INTEGER)
  499.    (saveA5 :SIGNED-LONG)
  500.    (reqCode :SIGNED-INTEGER)
  501.  
  502.    (inQueueRef :SIGNED-LONG)
  503.    (outQueueRef :SIGNED-LONG)
  504.    (MSAMSlotID :SIGNED-INTEGER)
  505.    (filler (:ARRAY :SIGNED-LONG 2))
  506.    )
  507.  
  508. (def-mactype :PMSAMSTATUS (find-mactype :SIGNED-INTEGER))
  509.  
  510. ;  Values of PMSAMStatus 
  511. (defconstant $kPMSAMStatusPending 1);  for inQueue and outQueue 
  512. (defconstant $kPMSAMStatusError 2);  for inQueue and outQueue 
  513. (defconstant $kPMSAMStatusSending 3);  for outQueue only 
  514. (defconstant $kPMSAMStatusCaching 4);  for inQueue only 
  515. (defconstant $kPMSAMStatusSent 5);  for outQueue only 
  516.  
  517. (defrecord PMSAMSetStatusPB 
  518.    (qLink :POINTER)
  519.    (reservedH1 :SIGNED-LONG)
  520.    (reservedH2 :SIGNED-LONG)
  521.    (ioCompletion :POINTER)
  522.    (ioResult :SIGNED-INTEGER)
  523.    (saveA5 :SIGNED-LONG)
  524.    (reqCode :SIGNED-INTEGER)
  525.  
  526.    (queueRef :SIGNED-LONG)
  527.    (seqNum :SIGNED-LONG)
  528.    (msgHint :SIGNED-LONG)       ;  for posting cache error,set this to 0 when report outq status 
  529.    (status :SIGNED-INTEGER)
  530.    )
  531.  
  532. (defrecord PMSAMLogErrorPB 
  533.    (qLink :POINTER)
  534.    (reservedH1 :SIGNED-LONG)
  535.    (reservedH2 :SIGNED-LONG)
  536.    (ioCompletion :POINTER)
  537.    (ioResult :SIGNED-INTEGER)
  538.    (saveA5 :SIGNED-LONG)
  539.    (reqCode :SIGNED-INTEGER)
  540.  
  541.    (MSAMSlotID :SIGNED-INTEGER) ;  0 for PMSAM errors 
  542.    (logEntry (:POINTER :MAILERRORLOGENTRYINFO))
  543.    (filler (:ARRAY :SIGNED-LONG 2))
  544.    )
  545.  
  546. ; **************************************************************************************
  547.  
  548. (defconstant $kMailMsgSummaryVersion 1)
  549.  
  550. (defrecord MailMasterData 
  551.    (attrMask :MAILATTRIBUTEBITMAP);  indicates attributes present in MsgSummary 
  552.    (messageID :IPMMSGID)
  553.    (replyID :IPMMSGID)
  554.    (conversationID :IPMMSGID)
  555.    )
  556.  
  557. ;  Values for addressedToMe in MailCoreData record 
  558.  
  559. (defconstant $kAddressedAs_TO #X1)
  560. (defconstant $kAddressedAs_CC #X2)
  561. (defconstant $kAddressedAs_BCC #X4)
  562.  
  563. (defrecord MailCoreData 
  564.    (letterFlags :MAILLETTERFLAGS)
  565.    (messageSize :SIGNED-LONG)
  566.    (letterIndications :MAILINDICATIONS)
  567.    (messageType :OCECREATORTYPE)
  568.    (sendTime :MAILTIME)
  569.    (messageFamily :OSTYPE)
  570.  
  571. ; ERROR!! Record field RESERVED declared Non-PACKED BYTE !
  572.    (reserved :UNSIGNED-BYTE)
  573.  
  574. ; ERROR!! Record field ADDRESSEDTOME declared Non-PACKED BYTE !
  575.    (addressedToMe :UNSIGNED-BYTE)
  576.    (agentInfo (:ARRAY :UNSIGNED-BYTE (- 6 1 -1)));  6 bytes of special info [set to zero] 
  577. ;  these are variable length and even padded 
  578.    (sender :RSTRING32)          ;  recipient's entityName (trunc) 
  579.    (subject :RSTRING32)         ;  subject maybe truncated 
  580.    )
  581.  
  582. (defrecord MSAMMsgSummary 
  583.    (version :SIGNED-INTEGER)    ;  following flags are defaulted by Toolbox 
  584.    (msgDeleted :BOOLEAN)        ;  true if msg is to be deleted by PMSAM 
  585.    (msgUpdated :BOOLEAN)        ;  true if msgSummary was updated by MailManager 
  586.    (msgCached :BOOLEAN)         ;  true if msg is in the slot's InQueue 
  587. ; padByte: Byte;
  588.    (masterData :MAILMASTERDATA)
  589.    (coreData :MAILCOREDATA)
  590.    )
  591.  
  592. (defconstant $kMailMaxPMSAMMsgSummaryData 128);  PMSAM can put up to 128 bytes of private msg summary data 
  593.  
  594. (defrecord PMSAMCreateMsgSummaryPB 
  595.    (qLink :POINTER)
  596.    (reservedH1 :SIGNED-LONG)
  597.    (reservedH2 :SIGNED-LONG)
  598.    (ioCompletion :POINTER)
  599.    (ioResult :SIGNED-INTEGER)
  600.    (saveA5 :SIGNED-LONG)
  601.    (reqCode :SIGNED-INTEGER)
  602.  
  603.    (inQueueRef :SIGNED-LONG)
  604.    (seqNum :SIGNED-LONG)        ;  <- seq of the new message 
  605.    (msgSummary (:POINTER :MSAMMSGSUMMARY));  attributes and mask filled in 
  606.    (buffer (:POINTER :MAILBUFFER));  PMSAM specific data to be appended 
  607.    )
  608.  
  609. (defrecord PMSAMPutMsgSummaryPB 
  610.    (qLink :POINTER)
  611.    (reservedH1 :SIGNED-LONG)
  612.    (reservedH2 :SIGNED-LONG)
  613.    (ioCompletion :POINTER)
  614.    (ioResult :SIGNED-INTEGER)
  615.    (saveA5 :SIGNED-LONG)
  616.    (reqCode :SIGNED-INTEGER)
  617.  
  618.    (inQueueRef :SIGNED-LONG)
  619.    (seqNum :SIGNED-LONG)
  620.    (letterFlags (:POINTER :MAILMASKEDLETTERFLAGS));  if not nil, then set letterFlags 
  621.    (buffer (:POINTER :MAILBUFFER));  PMSAM specific data to be overwritten 
  622.    )
  623.  
  624. (defrecord PMSAMGetMsgSummaryPB 
  625.    (qLink :POINTER)
  626.    (reservedH1 :SIGNED-LONG)
  627.    (reservedH2 :SIGNED-LONG)
  628.    (ioCompletion :POINTER)
  629.    (ioResult :SIGNED-INTEGER)
  630.    (saveA5 :SIGNED-LONG)
  631.    (reqCode :SIGNED-INTEGER)
  632.  
  633.    (inQueueRef :SIGNED-LONG)
  634.    (seqNum :SIGNED-LONG)
  635.    (msgSummary (:POINTER :MSAMMSGSUMMARY));  if not nil, then read in the msgSummary 
  636.    (buffer (:POINTER :MAILBUFFER));  PMSAM specific data to be read 
  637.    (msgSummaryOffset :SIGNED-INTEGER);  offset of PMSAM specific data  
  638. ;  from start of MsgSummary 
  639.    )
  640.  
  641. ; **************************************************************************************
  642. ;  Definitions for Server MSAMs 
  643. ; ************************************************************************************
  644.  
  645. (def-mactype :SMSAMADMINCODE (find-mactype :SIGNED-INTEGER))
  646.  
  647. ;  Values of SMSAMAdminCode 
  648. (defconstant $kSMSAMNotifyFwdrSetupChange 1)
  649. (defconstant $kSMSAMNotifyFwdrNameChange 2)
  650. (defconstant $kSMSAMNotifyFwdrPwdChange 3)
  651. (defconstant $kSMSAMGetDynamicFwdrParams 4)
  652.  
  653. (def-mactype :SMSAMSLOTCHANGES (find-mactype :SIGNED-LONG))
  654.  
  655. (defconstant $kSMSAMFwdrHomeInternetChangedBit 0)
  656. (defconstant $kSMSAMFwdrConnectedToChangedBit 1)
  657. (defconstant $kSMSAMFwdrForeignRLIsChangedBit 2)
  658. (defconstant $kSMSAMFwdrMnMServerChangedBit 3)
  659.  
  660. ;  Values of SMSAMSlotChanges 
  661. (defconstant $kSMSAMFwdrEverythingChangedMask -1)
  662. (defconstant $kSMSAMFwdrHomeInternetChangedMask #X1); 1<<kSMSAMFwdrHomeInternetChangedBit
  663. (defconstant $kSMSAMFwdrConnectedToChangedMask #X2); 1<<kSMSAMFwdrConnectedToChangedBit
  664. (defconstant $kSMSAMFwdrForeignRLIsChangedMask #X4); 1<<kSMSAMFwdrForeignRLIsChangedBit
  665. (defconstant $kSMSAMFwdrMnMServerChangedMask #X8); 1<<kSMSAMFwdrMnMServerChangedBit
  666.  
  667. (defrecord SMSAMSetupChange     ;  kSMSAMNotifyFwdrSetupChange 
  668.    (whatChanged :SIGNED-LONG)   ;   --> bitmap of what parameters changed 
  669.    (serverHint :ADDRBLOCK)      ;   --> try this ADAP server first 
  670.    )
  671.  
  672. (defrecord SMSAMNameChange      ;  kSMSAMNotifyFwdrNameChange 
  673.    (newName :RSTRING)           ;   --> msams new name 
  674.    (serverHint :ADDRBLOCK)      ;   --> try this ADAP server first 
  675.    )
  676.  
  677. (defrecord SMSAMPasswordChange  ;  kSMSAMNotifyFwdrPasswordChange 
  678.    (newPassword :RSTRING)       ;   --> msams new password 
  679.    (serverHint :ADDRBLOCK)      ;   --> try this ADAP server first 
  680.    )
  681.  
  682. (defrecord SMSAMDynamicParams   ;  kSMSAMGetDynamicFwdrParams 
  683.    (curDiskUsed :SIGNED-LONG)   ;  <--  amount of disk space used by msam 
  684.    (curMemoryUsed :SIGNED-LONG) ;  <--  amount of memory used by msam 
  685.    )
  686.  
  687. (defrecord SMSAMAdminEPPCRequest 
  688.    (adminCode :SIGNED-INTEGER)
  689.    (:variant 
  690.       ((setupChange :SMSAMSETUPCHANGE))
  691.       ((nameChange :SMSAMNAMECHANGE))
  692.       ((passwordChange :SMSAMPASSWORDCHANGE))
  693.       ((dynamicParams :SMSAMDYNAMICPARAMS))
  694.       ))
  695.  
  696. (defrecord SMSAMSetupPB 
  697.    (qLink :POINTER)
  698.    (reservedH1 :SIGNED-LONG)
  699.    (reservedH2 :SIGNED-LONG)
  700.    (ioCompletion :POINTER)
  701.    (ioResult :SIGNED-INTEGER)
  702.    (saveA5 :SIGNED-LONG)
  703.    (reqCode :SIGNED-INTEGER)
  704.  
  705.    (serverMSAM (:POINTER :RECORDID))
  706.    (password (:POINTER :RSTRING))
  707.    (gatewayType :OSTYPE)
  708.    (gatewayTypeDescription (:POINTER :RSTRING))
  709.    (catalogServerHint :ADDRBLOCK)
  710.    )
  711.  
  712. (defrecord SMSAMStartupPB 
  713.    (qLink :POINTER)
  714.    (reservedH1 :SIGNED-LONG)
  715.    (reservedH2 :SIGNED-LONG)
  716.    (ioCompletion :POINTER)
  717.    (ioResult :SIGNED-INTEGER)
  718.    (saveA5 :SIGNED-LONG)
  719.    (reqCode :SIGNED-INTEGER)
  720.  
  721.    (msamIdentity :SIGNED-LONG)
  722.    (queueRef :SIGNED-LONG)
  723.    )
  724.  
  725. (defrecord SMSAMShutdownPB 
  726.    (qLink :POINTER)
  727.    (reservedH1 :SIGNED-LONG)
  728.    (reservedH2 :SIGNED-LONG)
  729.    (ioCompletion :POINTER)
  730.    (ioResult :SIGNED-INTEGER)
  731.    (saveA5 :SIGNED-LONG)
  732.    (reqCode :SIGNED-INTEGER)
  733.  
  734.    (queueRef :SIGNED-LONG)
  735.    )
  736.  
  737. ; **************************************************************************************
  738. ;  Definitions for reading and writing MSAM Letters 
  739. ; **************************************************************************************
  740.  
  741. (defrecord MSAMEnumeratePB 
  742.    (qLink :POINTER)
  743.    (reservedH1 :SIGNED-LONG)
  744.    (reservedH2 :SIGNED-LONG)
  745.    (ioCompletion :POINTER)
  746.    (ioResult :SIGNED-INTEGER)
  747.    (saveA5 :SIGNED-LONG)
  748.    (reqCode :SIGNED-INTEGER)
  749.  
  750.    (queueRef :SIGNED-LONG)
  751.    (startSeqNum :SIGNED-LONG)
  752.    (nextSeqNum :SIGNED-LONG)
  753.    (buffer :MAILBUFFER)
  754. ;  buffer contains a Mail Reply. Each tuple is a
  755. ;         MSAMEnumerateInQReply when enumerating the inQueue
  756. ;         MSAMEnumerateOutQReply when enumerating the outQueue
  757. ;     
  758.    )
  759.  
  760. (defrecord MSAMEnumerateInQReply 
  761.    (seqNum :SIGNED-LONG)
  762.    (msgDeleted :BOOLEAN)        ;  true if msg is to be deleted by PMSAM 
  763.    (msgUpdated :BOOLEAN)        ;  true if MsgSummary has been updated by TB 
  764.    (msgCached :BOOLEAN)         ;  true if msg is in the incoming queue 
  765. ; padByte: Byte;
  766.    )
  767.  
  768. (defrecord MSAMEnumerateOutQReply 
  769.    (seqNum :SIGNED-LONG)
  770.  
  771. ; ERROR!! Record field DONE declared PACKED BOOLEAN !
  772.    (done :BOOLEAN)              ;  true if all responsible recipients have been processed 
  773.    (priority :IPMPRIORITY)
  774.    (approxSize :SIGNED-LONG)
  775.  
  776. ; ERROR!! Record field TUNNELFORM declared PACKED BOOLEAN !
  777.    (tunnelForm :BOOLEAN)        ;  true if this letter has to be tunnelled 
  778.    (padByte :UNSIGNED-BYTE)
  779.    (nextHop :NETWORKSPEC)       ;  valid if tunnelForm is true 
  780.    (msgType :OCECREATORTYPE)    ;  valid if tunnelForm is true 
  781.    )
  782.  
  783. (defrecord MSAMDeletePB 
  784.    (qLink :POINTER)
  785.    (reservedH1 :SIGNED-LONG)
  786.    (reservedH2 :SIGNED-LONG)
  787.    (ioCompletion :POINTER)
  788.    (ioResult :SIGNED-INTEGER)
  789.    (saveA5 :SIGNED-LONG)
  790.    (reqCode :SIGNED-INTEGER)
  791.  
  792.    (queueRef :SIGNED-LONG)
  793.    (seqNum :SIGNED-LONG)
  794.  
  795. ; ERROR!! Record field MSGONLY declared PACKED BOOLEAN !
  796.    (msgOnly :BOOLEAN)           ;  only valid for PMSAM & inQueue 
  797. ;  set true to delete message but not msgSummary 
  798.    (padByte :UNSIGNED-BYTE)
  799.    (result :SIGNED-INTEGER)     ;  only valid for SMSAM & tunnelled messages 
  800. ;  Values for result:
  801. ;                                             kIPMNoResponsibility
  802. ;                                             kIPMNoInformation
  803. ;                                             kIPMRecMaybeNotSent
  804. ;                                             kIPMRecMaybeSent
  805. ;                                             
  806.    )
  807.  
  808. (defrecord MSAMOpenPB 
  809.    (qLink :POINTER)
  810.    (reservedH1 :SIGNED-LONG)
  811.    (reservedH2 :SIGNED-LONG)
  812.    (ioCompletion :POINTER)
  813.    (ioResult :SIGNED-INTEGER)
  814.    (saveA5 :SIGNED-LONG)
  815.    (reqCode :SIGNED-INTEGER)
  816.  
  817.    (queueRef :SIGNED-LONG)
  818.    (seqNum :SIGNED-LONG)
  819.    (MailMsgRef :SIGNED-LONG)
  820.    )
  821.  
  822. (defrecord MSAMOpenNestedPB 
  823.    (qLink :POINTER)
  824.    (reservedH1 :SIGNED-LONG)
  825.    (reservedH2 :SIGNED-LONG)
  826.    (ioCompletion :POINTER)
  827.    (ioResult :SIGNED-INTEGER)
  828.    (saveA5 :SIGNED-LONG)
  829.    (reqCode :SIGNED-INTEGER)
  830.  
  831.    (MailMsgRef :SIGNED-LONG)
  832.    (nestedRef :SIGNED-LONG)
  833.    )
  834.  
  835. (defrecord MSAMClosePB 
  836.    (qLink :POINTER)
  837.    (reservedH1 :SIGNED-LONG)
  838.    (reservedH2 :SIGNED-LONG)
  839.    (ioCompletion :POINTER)
  840.    (ioResult :SIGNED-INTEGER)
  841.    (saveA5 :SIGNED-LONG)
  842.    (reqCode :SIGNED-INTEGER)
  843.  
  844.    (MailMsgRef :SIGNED-LONG)
  845.    )
  846.  
  847. (defrecord MSAMGetMsgHeaderPB 
  848.    (qLink :POINTER)
  849.    (reservedH1 :SIGNED-LONG)
  850.    (reservedH2 :SIGNED-LONG)
  851.    (ioCompletion :POINTER)
  852.    (ioResult :SIGNED-INTEGER)
  853.    (saveA5 :SIGNED-LONG)
  854.    (reqCode :SIGNED-INTEGER)
  855.  
  856.    (MailMsgRef :SIGNED-LONG)
  857.    (selector :IPMHEADERSELECTOR)
  858.    (offset :SIGNED-LONG)
  859.    (buffer :MAILBUFFER)
  860.    (remaining :SIGNED-LONG)
  861.    )
  862.  
  863. (defrecord MSAMGetAttributesPB 
  864.    (qLink :POINTER)
  865.    (reservedH1 :SIGNED-LONG)
  866.    (reservedH2 :SIGNED-LONG)
  867.    (ioCompletion :POINTER)
  868.    (ioResult :SIGNED-INTEGER)
  869.    (saveA5 :SIGNED-LONG)
  870.    (reqCode :SIGNED-INTEGER)
  871.  
  872.    (MailMsgRef :SIGNED-LONG)
  873.    (requestMask :MAILATTRIBUTEBITMAP);  kMailIndicationsBit thru kMailSubjectBit 
  874.    (buffer :MAILBUFFER)
  875. ;     buffer returned will contain the attribute values of
  876. ;         the attributes indicated in responseMask,
  877. ;         from the attribute indicated by the least significant bit set
  878. ;         to the attribute indicated by the most significant bit set.
  879. ;         Note that recipients - from, to, cc, bcc cannot be read using
  880. ;         this call. Use GetRecipients to read these.
  881. ;     
  882.    (responseMask :MAILATTRIBUTEBITMAP)
  883.    (more :BOOLEAN)
  884.    )
  885.  
  886. (defconstant $kMailResolvedList 0);  attrID value to get resolved recipient list 
  887.  
  888. (defrecord MailOriginalRecipient 
  889.    (index :SIGNED-INTEGER)
  890. ;  Followed by OCEPackedRecipient 
  891.    )
  892.  
  893. (defrecord MailResolvedRecipient 
  894.    (index :SIGNED-INTEGER)
  895.    (recipientFlags :SIGNED-INTEGER)
  896.  
  897. ; ERROR!! Record field RESPONSIBLE declared PACKED BOOLEAN !
  898.    (responsible :BOOLEAN)
  899.    (padByte :UNSIGNED-BYTE)
  900. ;  Followed by OCEPackedRecipient 
  901.    )
  902.  
  903. (defrecord MSAMGetRecipientsPB 
  904.    (qLink :POINTER)
  905.    (reservedH1 :SIGNED-LONG)
  906.    (reservedH2 :SIGNED-LONG)
  907.    (ioCompletion :POINTER)
  908.    (ioResult :SIGNED-INTEGER)
  909.    (saveA5 :SIGNED-LONG)
  910.    (reqCode :SIGNED-INTEGER)
  911.  
  912.    (MailMsgRef :SIGNED-LONG)
  913.    (attrID :SIGNED-INTEGER)     ;  kMailFromBit thru kMailBccBit 
  914.    (startIndex :SIGNED-INTEGER) ;  starts at 1 
  915.    (buffer :MAILBUFFER)
  916. ;      buffer contains a Mail Reply. Each tuple is a
  917. ;         MailOriginalRecipient if getting original recipients
  918. ;                                 ie the attrID is kMail[From, To, Cc, Bcc]Bit
  919. ;         MailResolvedRecipient if getting resolved reicpients
  920. ;                                 ie the attrID is kMailResolvedList
  921. ;         Both tuples are word alligned.
  922. ;     
  923.    (nextIndex :SIGNED-INTEGER)
  924.    (more :BOOLEAN)
  925.    )
  926.  
  927. (defrecord MSAMGetContentPB 
  928.    (qLink :POINTER)
  929.    (reservedH1 :SIGNED-LONG)
  930.    (reservedH2 :SIGNED-LONG)
  931.    (ioCompletion :POINTER)
  932.    (ioResult :SIGNED-INTEGER)
  933.    (saveA5 :SIGNED-LONG)
  934.    (reqCode :SIGNED-INTEGER)
  935.  
  936.    (MailMsgRef :SIGNED-LONG)
  937.    (segmentMask :SIGNED-INTEGER)
  938.    (buffer :MAILBUFFER)
  939.    (textScrap (:POINTER :STSCRPREC))
  940.    (script :SIGNED-INTEGER)
  941.    (segmentType :SIGNED-INTEGER)
  942.    (endOfScript :BOOLEAN)
  943.    (endOfSegment :BOOLEAN)
  944.    (endOfContent :BOOLEAN)
  945.    (segmentLength :SIGNED-LONG) ;  NEW: <-  valid first call in a segment 
  946.    (segmentID :SIGNED-LONG)     ;  NEW: <-> identifier for this segment 
  947.    )
  948.  
  949. (defrecord MSAMGetEnclosurePB 
  950.    (qLink :POINTER)
  951.    (reservedH1 :SIGNED-LONG)
  952.    (reservedH2 :SIGNED-LONG)
  953.    (ioCompletion :POINTER)
  954.    (ioResult :SIGNED-INTEGER)
  955.    (saveA5 :SIGNED-LONG)
  956.    (reqCode :SIGNED-INTEGER)
  957.  
  958.    (MailMsgRef :SIGNED-LONG)
  959.  
  960. ; ERROR!! Record field CONTENTENCLOSURE declared PACKED BOOLEAN !
  961.    (contentEnclosure :BOOLEAN)
  962.    (padByte :UNSIGNED-BYTE)
  963.    (buffer :MAILBUFFER)
  964.  
  965. ; ERROR!! Record field ENDOFFILE declared PACKED BOOLEAN !
  966.    (endOfFile :BOOLEAN)
  967.  
  968. ; ERROR!! Record field ENDOFENCLOSURES declared PACKED BOOLEAN !
  969.    (endOfEnclosures :BOOLEAN)
  970.    )
  971.  
  972. (defrecord MailBlockInfo 
  973.    (blockType :OCECREATORTYPE)
  974.    (offset :SIGNED-LONG)
  975.    (blockLength :SIGNED-LONG)
  976.    )
  977.  
  978. (defrecord MSAMEnumerateBlocksPB 
  979.    (qLink :POINTER)
  980.    (reservedH1 :SIGNED-LONG)
  981.    (reservedH2 :SIGNED-LONG)
  982.    (ioCompletion :POINTER)
  983.    (ioResult :SIGNED-INTEGER)
  984.    (saveA5 :SIGNED-LONG)
  985.    (reqCode :SIGNED-INTEGER)
  986.  
  987.    (MailMsgRef :SIGNED-LONG)
  988.    (startIndex :SIGNED-INTEGER) ;  starts at 1 
  989.    (buffer :MAILBUFFER)
  990. ;      buffer contains a Mail Reply. Each tuple is a MailBlockInfo 
  991.    (nextIndex :SIGNED-INTEGER)
  992.    (more :BOOLEAN)
  993.    )
  994.  
  995. (defrecord MSAMGetBlockPB 
  996.    (qLink :POINTER)
  997.    (reservedH1 :SIGNED-LONG)
  998.    (reservedH2 :SIGNED-LONG)
  999.    (ioCompletion :POINTER)
  1000.    (ioResult :SIGNED-INTEGER)
  1001.    (saveA5 :SIGNED-LONG)
  1002.    (reqCode :SIGNED-INTEGER)
  1003.  
  1004.    (MailMsgRef :SIGNED-LONG)
  1005.    (blockType :OCECREATORTYPE)
  1006.    (blockIndex :SIGNED-INTEGER)
  1007.    (buffer :MAILBUFFER)
  1008.    (dataOffset :SIGNED-LONG)
  1009.  
  1010. ; ERROR!! Record field ENDOFBLOCK declared PACKED BOOLEAN !
  1011.    (endOfBlock :BOOLEAN)
  1012.    (padByte :UNSIGNED-BYTE)
  1013.    (remaining :SIGNED-LONG)
  1014.    )
  1015.  
  1016. ;  YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1017. ;   THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1018. ;   REASONS.
  1019.  
  1020. (defrecord MSAMMarkRecipientsPB ;  not valid for tunnel form letters 
  1021.    (qLink :POINTER)
  1022.    (reservedH1 :SIGNED-LONG)
  1023.    (reservedH2 :SIGNED-LONG)
  1024.    (ioCompletion :POINTER)
  1025.    (ioResult :SIGNED-INTEGER)
  1026.    (saveA5 :SIGNED-LONG)
  1027.    (reqCode :SIGNED-INTEGER)
  1028.  
  1029.    (queueRef :SIGNED-LONG)
  1030.    (seqNum :SIGNED-LONG)
  1031.    (buffer :MAILBUFFER)
  1032. ;      buffer contains a Mail Reply. Each tuple is an unsigned short,
  1033. ;         the index of a recipient to be marked. 
  1034.    )
  1035.  
  1036. ;   same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1037. ;   queueRef, seqNum 
  1038.  
  1039. (defrecord MSAMnMarkRecipientsPB ;  not valid for tunnel form letters 
  1040.    (qLink :POINTER)
  1041.    (reservedH1 :SIGNED-LONG)
  1042.    (reservedH2 :SIGNED-LONG)
  1043.    (ioCompletion :POINTER)
  1044.    (ioResult :SIGNED-INTEGER)
  1045.    (saveA5 :SIGNED-LONG)
  1046.    (reqCode :SIGNED-INTEGER)
  1047.  
  1048.    (MailMsgRef :SIGNED-LONG)
  1049.    (buffer :MAILBUFFER)
  1050. ;      buffer contains a Mail Reply. Each tuple is an unsigned short,
  1051. ;         the index of a recipient to be marked. 
  1052.    )
  1053.  
  1054. ; **************************************************************************************
  1055. (defrecord MSAMCreatePB 
  1056.    (qLink :POINTER)
  1057.    (reservedH1 :SIGNED-LONG)
  1058.    (reservedH2 :SIGNED-LONG)
  1059.    (ioCompletion :POINTER)
  1060.    (ioResult :SIGNED-INTEGER)
  1061.    (saveA5 :SIGNED-LONG)
  1062.    (reqCode :SIGNED-INTEGER)
  1063.  
  1064.    (queueRef :SIGNED-LONG)
  1065.    (asLetter :BOOLEAN)          ;  indicate if we should create as letter or msg 
  1066.    (msgType :IPMMSGTYPE)        ;  is msg creator/type if msg, mail type creator o.w. 
  1067. ;  default for mail should be: kMailAppleMailCreator, 
  1068. ;  kMailLtrMsgType 
  1069. ;  OLD: type lttr indicates create letter 
  1070.    (refCon :SIGNED-LONG)        ;  for messages only 
  1071.    (seqNum :SIGNED-LONG)        ;  set if creating message in the inQueue 
  1072.    (tunnelForm :BOOLEAN)        ;  if true tunnelForm else newForm 
  1073.    (bccRecipients :BOOLEAN)     ;  true if creating letter with bcc recipients 
  1074.    (newRef :SIGNED-LONG)
  1075.    )
  1076.  
  1077. (defrecord MSAMBeginNestedPB 
  1078.    (qLink :POINTER)
  1079.    (reservedH1 :SIGNED-LONG)
  1080.    (reservedH2 :SIGNED-LONG)
  1081.    (ioCompletion :POINTER)
  1082.    (ioResult :SIGNED-INTEGER)
  1083.    (saveA5 :SIGNED-LONG)
  1084.    (reqCode :SIGNED-INTEGER)
  1085.  
  1086.    (MailMsgRef :SIGNED-LONG)
  1087.    (refCon :SIGNED-LONG)        ;  for messages only 
  1088.    (msgType :IPMMSGTYPE)
  1089.    )
  1090.  
  1091. (defrecord MSAMEndNestedPB 
  1092.    (qLink :POINTER)
  1093.    (reservedH1 :SIGNED-LONG)
  1094.    (reservedH2 :SIGNED-LONG)
  1095.    (ioCompletion :POINTER)
  1096.    (ioResult :SIGNED-INTEGER)
  1097.    (saveA5 :SIGNED-LONG)
  1098.    (reqCode :SIGNED-INTEGER)
  1099.  
  1100.    (MailMsgRef :SIGNED-LONG)
  1101.    )
  1102.  
  1103. (defrecord MSAMSubmitPB 
  1104.    (qLink :POINTER)
  1105.    (reservedH1 :SIGNED-LONG)
  1106.    (reservedH2 :SIGNED-LONG)
  1107.    (ioCompletion :POINTER)
  1108.    (ioResult :SIGNED-INTEGER)
  1109.    (saveA5 :SIGNED-LONG)
  1110.    (reqCode :SIGNED-INTEGER)
  1111.  
  1112.    (MailMsgRef :SIGNED-LONG)
  1113.  
  1114. ; ERROR!! Record field SUBMITFLAG declared PACKED BOOLEAN !
  1115.    (submitFlag :BOOLEAN)
  1116.    (padByte :UNSIGNED-BYTE)
  1117.    (msgID :IPMMSGID)
  1118.    )
  1119.  
  1120. (defrecord MSAMPutMsgHeaderPB 
  1121.    (qLink :POINTER)
  1122.    (reservedH1 :SIGNED-LONG)
  1123.    (reservedH2 :SIGNED-LONG)
  1124.    (ioCompletion :POINTER)
  1125.    (ioResult :SIGNED-INTEGER)
  1126.    (saveA5 :SIGNED-LONG)
  1127.    (reqCode :SIGNED-INTEGER)
  1128.  
  1129.    (MailMsgRef :SIGNED-LONG)
  1130.    (replyQueue (:POINTER :OCERECIPIENT))
  1131.    (sender (:POINTER :IPMSENDER))
  1132.    (deliveryNotification :IPMNOTIFICATIONTYPE)
  1133.    (priority :IPMPRIORITY)
  1134.    )
  1135.  
  1136. (defrecord MSAMPutAttributePB 
  1137.    (qLink :POINTER)
  1138.    (reservedH1 :SIGNED-LONG)
  1139.    (reservedH2 :SIGNED-LONG)
  1140.    (ioCompletion :POINTER)
  1141.    (ioResult :SIGNED-INTEGER)
  1142.    (saveA5 :SIGNED-LONG)
  1143.    (reqCode :SIGNED-INTEGER)
  1144.  
  1145.    (MailMsgRef :SIGNED-LONG)
  1146.    (attrID :SIGNED-INTEGER)     ;  kMailIndicationsBit thru kMailSubjectBit 
  1147.    (buffer :MAILBUFFER)
  1148.    )
  1149.  
  1150. (defrecord MSAMPutRecipientPB 
  1151.    (qLink :POINTER)
  1152.    (reservedH1 :SIGNED-LONG)
  1153.    (reservedH2 :SIGNED-LONG)
  1154.    (ioCompletion :POINTER)
  1155.    (ioResult :SIGNED-INTEGER)
  1156.    (saveA5 :SIGNED-LONG)
  1157.    (reqCode :SIGNED-INTEGER)
  1158.  
  1159.    (MailMsgRef :SIGNED-LONG)
  1160.    (attrID :SIGNED-INTEGER)     ;  kMailFromBit thru kMailBccBit 
  1161.    (recipient (:POINTER :OCERECIPIENT))
  1162.    (responsible :BOOLEAN)       ;  valid for server and message msams only 
  1163.    )
  1164.  
  1165. (defrecord MSAMPutContentPB 
  1166.    (qLink :POINTER)
  1167.    (reservedH1 :SIGNED-LONG)
  1168.    (reservedH2 :SIGNED-LONG)
  1169.    (ioCompletion :POINTER)
  1170.    (ioResult :SIGNED-INTEGER)
  1171.    (saveA5 :SIGNED-LONG)
  1172.    (reqCode :SIGNED-INTEGER)
  1173.  
  1174.    (MailMsgRef :SIGNED-LONG)
  1175.    (segmentType :SIGNED-INTEGER)
  1176.  
  1177. ; ERROR!! Record field APPEND declared PACKED BOOLEAN !
  1178.    (append :BOOLEAN)
  1179.    (padByte :UNSIGNED-BYTE)
  1180.    (buffer :MAILBUFFER)
  1181.    (textScrap (:POINTER :STSCRPREC))
  1182.  
  1183. ; ERROR!! Record field STARTNEWSCRIPT declared PACKED BOOLEAN !
  1184.    (startNewScript :BOOLEAN)
  1185.    (script :SIGNED-INTEGER)     ;  valid only if startNewScript is true 
  1186.    )
  1187.  
  1188. (defrecord MSAMPutEnclosurePB 
  1189.    (qLink :POINTER)
  1190.    (reservedH1 :SIGNED-LONG)
  1191.    (reservedH2 :SIGNED-LONG)
  1192.    (ioCompletion :POINTER)
  1193.    (ioResult :SIGNED-INTEGER)
  1194.    (saveA5 :SIGNED-LONG)
  1195.    (reqCode :SIGNED-INTEGER)
  1196.  
  1197.    (MailMsgRef :SIGNED-LONG)
  1198.    (contentEnclosure :BOOLEAN)
  1199.    (padByte :BOOLEAN)
  1200.    (hfs :BOOLEAN)               ;  true => in file system, false => in memory 
  1201.    (append :BOOLEAN)
  1202.    (buffer :MAILBUFFER)         ;  Unused if hfs == true 
  1203.    (enclosure :FSSPEC)
  1204.    (addlInfo :MAILENCLOSUREINFO)
  1205.    )
  1206.  
  1207. (defrecord MSAMPutBlockPB 
  1208.    (qLink :POINTER)
  1209.    (reservedH1 :SIGNED-LONG)
  1210.    (reservedH2 :SIGNED-LONG)
  1211.    (ioCompletion :POINTER)
  1212.    (ioResult :SIGNED-INTEGER)
  1213.    (saveA5 :SIGNED-LONG)
  1214.    (reqCode :SIGNED-INTEGER)
  1215.  
  1216.    (MailMsgRef :SIGNED-LONG)
  1217.    (refCon :SIGNED-LONG)        ;  for messages only 
  1218.    (blockType :OCECREATORTYPE)
  1219.    (append :BOOLEAN)
  1220.    (buffer :MAILBUFFER)
  1221.    (mode :SIGNED-INTEGER)       ;  if blockType is kMailTunnelLtrType or kMailHopInfoType 
  1222. ;  mode is assumed to be kMailFromMark 
  1223.    (offset :SIGNED-LONG)
  1224.    )
  1225.  
  1226. ; **************************************************************************************
  1227. (defrecord MSAMCreateReportPB 
  1228.    (qLink :POINTER)
  1229.    (reservedH1 :SIGNED-LONG)
  1230.    (reservedH2 :SIGNED-LONG)
  1231.    (ioCompletion :POINTER)
  1232.    (ioResult :SIGNED-INTEGER)
  1233.    (saveA5 :SIGNED-LONG)
  1234.    (reqCode :SIGNED-INTEGER)
  1235.  
  1236.    (queueRef :SIGNED-LONG)      ;  to distinguish personal and server MSAMs 
  1237.    (MailMsgRef :SIGNED-LONG)
  1238.    (msgID :IPMMSGID)            ;  kMailLetterIDBit of letter being reported upon 
  1239.    (sender (:POINTER :OCERECIPIENT));  sender of the letter you are creating report on 
  1240.    )
  1241.  
  1242. (defrecord MSAMPutRecipientReportPB 
  1243.    (qLink :POINTER)
  1244.    (reservedH1 :SIGNED-LONG)
  1245.    (reservedH2 :SIGNED-LONG)
  1246.    (ioCompletion :POINTER)
  1247.    (ioResult :SIGNED-INTEGER)
  1248.    (saveA5 :SIGNED-LONG)
  1249.    (reqCode :SIGNED-INTEGER)
  1250.  
  1251.    (MailMsgRef :SIGNED-LONG)
  1252.    (recipientIndex :SIGNED-INTEGER);  recipient index in the original letter 
  1253.    (result :SIGNED-INTEGER)     ;  result of sending the recipient 
  1254. ;  Values for result:
  1255. ;                                             kIPMNoResponsibility
  1256. ;                                             kIPMNoInformation
  1257. ;                                             kIPMRecMaybeNotSent
  1258. ;                                             kIPMRecMaybeSent
  1259. ;                                         
  1260.    )
  1261.  
  1262. ; **************************************************************************************
  1263.  
  1264. (defrecord MailWakeupPMSAMPB 
  1265.    (qLink :POINTER)
  1266.    (reservedH1 :SIGNED-LONG)
  1267.    (reservedH2 :SIGNED-LONG)
  1268.    (ioCompletion :POINTER)
  1269.    (ioResult :SIGNED-INTEGER)
  1270.    (saveA5 :SIGNED-LONG)
  1271.    (reqCode :SIGNED-INTEGER)
  1272.  
  1273.    (pmsamCID :CREATIONID)
  1274.    (MailSlotID :SIGNED-INTEGER)
  1275.    )
  1276.  
  1277. (defrecord MailCreateMailSlotPB 
  1278.    (qLink :POINTER)
  1279.    (reservedH1 :SIGNED-LONG)
  1280.    (reservedH2 :SIGNED-LONG)
  1281.    (ioCompletion :POINTER)
  1282.    (ioResult :SIGNED-INTEGER)
  1283.    (saveA5 :SIGNED-LONG)
  1284.    (reqCode :SIGNED-INTEGER)
  1285.  
  1286.    (MailboxRef :SIGNED-LONG)
  1287.    (timeout :SIGNED-LONG)
  1288.    (pmsamCID :CREATIONID)
  1289.    (SMCA :SMCA)
  1290.    )
  1291.  
  1292. (defrecord MailModifyMailSlotPB 
  1293.    (qLink :POINTER)
  1294.    (reservedH1 :SIGNED-LONG)
  1295.    (reservedH2 :SIGNED-LONG)
  1296.    (ioCompletion :POINTER)
  1297.    (ioResult :SIGNED-INTEGER)
  1298.    (saveA5 :SIGNED-LONG)
  1299.    (reqCode :SIGNED-INTEGER)
  1300.  
  1301.    (MailboxRef :SIGNED-LONG)
  1302.    (timeout :SIGNED-LONG)
  1303.    (pmsamCID :CREATIONID)
  1304.    (SMCA :SMCA)
  1305.    )
  1306.  
  1307. ; **************************************************************************************
  1308.  
  1309. (defconstant $kPMSAMGetMSAMRecord 1286)
  1310. (defconstant $kPMSAMOpenQueues 1280)
  1311. (defconstant $kPMSAMLogError 1313)
  1312. (defconstant $kPMSAMSetStatus 1319)
  1313.  
  1314. (defconstant $kPMSAMCreateMsgSummary 1314)
  1315. (defconstant $kPMSAMPutMsgSummary 1317)
  1316. (defconstant $kPMSAMGetMsgSummary 1318)
  1317.  
  1318. (defconstant $kMailWakeupPMSAM 1287)
  1319.  
  1320. (defconstant $kSMSAMSetup 1315)
  1321. (defconstant $kSMSAMStartup 1281)
  1322. (defconstant $kSMSAMShutdown 1282)
  1323.  
  1324. (defconstant $kMSAMEnumerate 1283)
  1325. (defconstant $kMSAMDelete 1284)
  1326.  
  1327. (defconstant $kMSAMOpen 1288)
  1328. (defconstant $kMSAMOpenNested 1289)
  1329. (defconstant $kMSAMClose 1290)
  1330. (defconstant $kMSAMGetMsgHeader 1297)
  1331. (defconstant $kMSAMnMarkRecipients 1298)
  1332.  
  1333. (defconstant $kMSAMGetAttributes 1291)
  1334. (defconstant $kMSAMGetRecipients 1292)
  1335. (defconstant $kMSAMGetContent 1293)
  1336. (defconstant $kMSAMGetEnclosure 1294)
  1337. (defconstant $kMSAMEnumerateBlocks 1295)
  1338. (defconstant $kMSAMGetBlock 1296)
  1339. (defconstant $kMSAMMarkRecipients 1285)
  1340.  
  1341. (defconstant $kMSAMCreate 1300)
  1342. (defconstant $kMSAMBeginNested 1301)
  1343. (defconstant $kMSAMEndNested 1302)
  1344. (defconstant $kMSAMSubmit 1303)
  1345. (defconstant $kMSAMPutMsgHeader 1309)
  1346. (defconstant $kMSAMPutAttribute 1304)
  1347. (defconstant $kMSAMPutRecipient 1305)
  1348. (defconstant $kMSAMPutContent 1306)
  1349. (defconstant $kMSAMPutEnclosure 1307)
  1350. (defconstant $kMSAMPutBlock 1308)
  1351.  
  1352. (defconstant $kMSAMCreateReport 1311)
  1353. (defconstant $kMSAMPutRecipientReport 1312)
  1354.  
  1355. (defconstant $kMailCreateMailSlot 1323)
  1356. (defconstant $kMailModifyMailSlot 1324)
  1357.  
  1358. (defrecord MSAMParam 
  1359.    (:variant 
  1360.       ((header :MAILPARAMBLOCKHEADER))
  1361.       ((pmsamGetMSAMRecord :PMSAMGETMSAMRECORDPB))
  1362.       ((pmsamOpenQueues :PMSAMOPENQUEUESPB))
  1363.       ((pmsamSetStatus :PMSAMSETSTATUSPB))
  1364.       ((pmsamLogError :PMSAMLOGERRORPB))
  1365.       ((smsamSetup :SMSAMSETUPPB))
  1366.       ((smsamStartup :SMSAMSTARTUPPB))
  1367.       ((smsamShutdown :SMSAMSHUTDOWNPB))
  1368.       ((msamEnumerate :MSAMENUMERATEPB))
  1369.       ((msamDelete :MSAMDELETEPB))
  1370.       ((msamOpen :MSAMOPENPB))
  1371.       ((msamOpenNested :MSAMOPENNESTEDPB))
  1372.       ((msamClose :MSAMCLOSEPB))
  1373.       ((msamGetMsgHeader :MSAMGETMSGHEADERPB))
  1374.       ((msamGetAttributes :MSAMGETATTRIBUTESPB))
  1375.       ((msamGetRecipients :MSAMGETRECIPIENTSPB))
  1376.       ((msamGetContent :MSAMGETCONTENTPB))
  1377.       ((msamGetEnclosure :MSAMGETENCLOSUREPB))
  1378.       ((msamEnumerateBlocks :MSAMENUMERATEBLOCKSPB))
  1379.       ((msamGetBlock :MSAMGETBLOCKPB))
  1380.       ((msamMarkRecipients :MSAMMARKRECIPIENTSPB))
  1381.       ((msamnMarkRecipients :MSAMNMARKRECIPIENTSPB))
  1382.       ((msamCreate :MSAMCREATEPB))
  1383.       ((msamBeginNested :MSAMBEGINNESTEDPB))
  1384.       ((msamEndNested :MSAMENDNESTEDPB))
  1385.       ((msamSubmit :MSAMSUBMITPB))
  1386.       ((msamPutMsgHeader :MSAMPUTMSGHEADERPB))
  1387.       ((msamPutAttribute :MSAMPUTATTRIBUTEPB))
  1388.       ((msamPutRecipient :MSAMPUTRECIPIENTPB))
  1389.       ((msamPutContent :MSAMPUTCONTENTPB))
  1390.       ((msamPutEnclosure :MSAMPUTENCLOSUREPB))
  1391.       ((msamPutBlock :MSAMPUTBLOCKPB))
  1392.       ((msamCreateReport :MSAMCREATEREPORTPB));  Reports and Error Handling Calls 
  1393.       ((msamPutRecipientReport :MSAMPUTRECIPIENTREPORTPB))
  1394.       ((pmsamCreateMsgSummary :PMSAMCREATEMSGSUMMARYPB))
  1395.       ((pmsamPutMsgSummary :PMSAMPUTMSGSUMMARYPB))
  1396.       ((pmsamGetMsgSummary :PMSAMGETMSGSUMMARYPB))
  1397.       ((wakeupPMSAM :MAILWAKEUPPMSAMPB))
  1398.       ((createMailSlot :MAILCREATEMAILSLOTPB))
  1399.       ((modifyMailSlot :MAILMODIFYMAILSLOTPB))
  1400.       ))
  1401.  
  1402.  
  1403. (deftrap _mailcreatemailslot ((paramblock (:pointer :msamparam)))
  1404.    (:stack :signed-integer)
  1405.    (:stack-trap #xAA5E paramblock (86704384 :signed-longint)))
  1406.  
  1407. (deftrap _mailmodifymailslot ((paramblock (:pointer :msamparam)))
  1408.    (:stack :signed-integer)
  1409.    (:stack-trap #xAA5E paramblock (86769920 :signed-longint)))
  1410.  
  1411. (deftrap _maildeletemailslot ((paramblock (:pointer :msamparam)))
  1412.    (:stack :signed-integer)
  1413.    (:stack-trap #xAA5E paramblock (86835456 :signed-longint)))
  1414.  
  1415. (deftrap _mailwakeuppmsam ((paramblock (:pointer :msamparam)))
  1416.    (:stack :signed-integer)
  1417.    (:stack-trap #xAA5E paramblock (84345088 :signed-longint)))
  1418.  
  1419. ;  Personal MSAM Glue Routines 
  1420.  
  1421. (deftrap _pmsamopenqueues ((paramblock (:pointer :msamparam)))
  1422.    (:stack :signed-integer)
  1423.    (:stack-trap #xAA5E paramblock (83886080 :signed-longint)))
  1424.  
  1425. (deftrap _pmsamsetstatus ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1426.    (:stack :signed-integer)
  1427.    (:stack-trap #xAA5E paramblock asyncflag (1319 :signed-integer)))
  1428.  
  1429. (deftrap _pmsamgetmsamrecord ((paramblock (:pointer :msamparam)))
  1430.    (:stack :signed-integer)
  1431.    (:stack-trap #xAA5E paramblock (84279296 :signed-longint)))
  1432.  
  1433. ;  Server MSAM Glue Routines 
  1434.  
  1435. (deftrap _smsamstartup ((paramblock (:pointer :msamparam)))
  1436.    (:stack :signed-integer)
  1437.    (:stack-trap #xAA5E paramblock (83951616 :signed-longint)))
  1438.  
  1439. (deftrap _smsamshutdown ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1440.    (:stack :signed-integer)
  1441.    (:stack-trap #xAA5E paramblock asyncflag (1282 :signed-integer)))
  1442.  
  1443. ;  Get Interface Glue Routines 
  1444.  
  1445. (deftrap _msamenumerate ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1446.    (:stack :signed-integer)
  1447.    (:stack-trap #xAA5E paramblock asyncflag (1283 :signed-integer)))
  1448.  
  1449. (deftrap _msamdelete ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1450.    (:stack :signed-integer)
  1451.    (:stack-trap #xAA5E paramblock asyncflag (1284 :signed-integer)))
  1452.  
  1453. (deftrap _msammarkrecipients ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1454.    (:stack :signed-integer)
  1455.    (:stack-trap #xAA5E paramblock asyncflag (1285 :signed-integer)))
  1456.  
  1457. (deftrap _msamnmarkrecipients ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1458.    (:stack :signed-integer)
  1459.    (:stack-trap #xAA5E paramblock asyncflag (1298 :signed-integer)))
  1460.  
  1461.  
  1462. (deftrap _msamopen ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1463.    (:stack :signed-integer)
  1464.    (:stack-trap #xAA5E paramblock asyncflag (1288 :signed-integer)))
  1465.  
  1466. (deftrap _msamopennested ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1467.    (:stack :signed-integer)
  1468.    (:stack-trap #xAA5E paramblock asyncflag (1289 :signed-integer)))
  1469.  
  1470. (deftrap _msamclose ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1471.    (:stack :signed-integer)
  1472.    (:stack-trap #xAA5E paramblock asyncflag (1290 :signed-integer)))
  1473.  
  1474.  
  1475. (deftrap _msamgetrecipients ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1476.    (:stack :signed-integer)
  1477.    (:stack-trap #xAA5E paramblock asyncflag (1292 :signed-integer)))
  1478.  
  1479. (deftrap _msamgetattributes ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1480.    (:stack :signed-integer)
  1481.    (:stack-trap #xAA5E paramblock asyncflag (1291 :signed-integer)))
  1482.  
  1483. (deftrap _msamgetcontent ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1484.    (:stack :signed-integer)
  1485.    (:stack-trap #xAA5E paramblock asyncflag (1293 :signed-integer)))
  1486.  
  1487. (deftrap _msamgetenclosure ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1488.    (:stack :signed-integer)
  1489.    (:stack-trap #xAA5E paramblock asyncflag (1294 :signed-integer)))
  1490.  
  1491. (deftrap _msamenumerateblocks ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1492.    (:stack :signed-integer)
  1493.    (:stack-trap #xAA5E paramblock asyncflag (1295 :signed-integer)))
  1494.  
  1495. (deftrap _msamgetblock ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1496.    (:stack :signed-integer)
  1497.    (:stack-trap #xAA5E paramblock asyncflag (1296 :signed-integer)))
  1498.  
  1499. (deftrap _msamgetmsgheader ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1500.    (:stack :signed-integer)
  1501.    (:stack-trap #xAA5E paramblock asyncflag (1297 :signed-integer)))
  1502.  
  1503. ;  Put Interface Glue Routines 
  1504.  
  1505. (deftrap _msamcreate ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1506.    (:stack :signed-integer)
  1507.    (:stack-trap #xAA5E paramblock asyncflag (1300 :signed-integer)))
  1508.  
  1509. (deftrap _msambeginnested ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1510.    (:stack :signed-integer)
  1511.    (:stack-trap #xAA5E paramblock asyncflag (1301 :signed-integer)))
  1512.  
  1513. (deftrap _msamendnested ((paramblock (:pointer :msamparam)))
  1514.    (:stack :signed-integer)
  1515.    (:stack-trap #xAA5E paramblock (85327872 :signed-longint)))
  1516.  
  1517. (deftrap _msamsubmit ((paramblock (:pointer :msamparam)))
  1518.    (:stack :signed-integer)
  1519.    (:stack-trap #xAA5E paramblock (85393408 :signed-longint)));   SYNCHRONOUS ONLY 
  1520.  
  1521.  
  1522. (deftrap _msamputattribute ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1523.    (:stack :signed-integer)
  1524.    (:stack-trap #xAA5E paramblock asyncflag (1304 :signed-integer)))
  1525.  
  1526. (deftrap _msamputrecipient ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1527.    (:stack :signed-integer)
  1528.    (:stack-trap #xAA5E paramblock asyncflag (1305 :signed-integer)))
  1529.  
  1530. (deftrap _msamputcontent ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1531.    (:stack :signed-integer)
  1532.    (:stack-trap #xAA5E paramblock asyncflag (1306 :signed-integer)))
  1533.  
  1534. (deftrap _msamputenclosure ((paramblock (:pointer :msamparam)))
  1535.    (:stack :signed-integer)
  1536.    (:stack-trap #xAA5E paramblock (85655552 :signed-longint)));   SYNCHRONOUS ONLY 
  1537.  
  1538. (deftrap _msamputblock ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1539.    (:stack :signed-integer)
  1540.    (:stack-trap #xAA5E paramblock asyncflag (1308 :signed-integer)))
  1541.  
  1542. (deftrap _msamputmsgheader ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1543.    (:stack :signed-integer)
  1544.    (:stack-trap #xAA5E paramblock asyncflag (1309 :signed-integer)))
  1545.  
  1546. ;  Reports and Error Handling Glue Routines 
  1547.  
  1548. (deftrap _msamcreatereport ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1549.    (:stack :signed-integer)
  1550.    (:stack-trap #xAA5E paramblock asyncflag (1311 :signed-integer)))
  1551.  
  1552. (deftrap _msamputrecipientreport ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1553.    (:stack :signed-integer)
  1554.    (:stack-trap #xAA5E paramblock asyncflag (1312 :signed-integer)))
  1555.  
  1556. (deftrap _pmsamlogerror ((paramblock (:pointer :msamparam)))
  1557.    (:stack :signed-integer)
  1558.    (:stack-trap #xAA5E paramblock (86048768 :signed-longint)))
  1559.  
  1560. ;  MsgSummary Glue Routines 
  1561.  
  1562. (deftrap _pmsamcreatemsgsummary ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1563.    (:stack :signed-integer)
  1564.    (:stack-trap #xAA5E paramblock asyncflag (1314 :signed-integer)))
  1565.  
  1566. (deftrap _pmsamputmsgsummary ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1567.    (:stack :signed-integer)
  1568.    (:stack-trap #xAA5E paramblock asyncflag (1317 :signed-integer)))
  1569.  
  1570. (deftrap _pmsamgetmsgsummary ((paramblock (:pointer :msamparam)) (asyncflag :boolean))
  1571.    (:stack :signed-integer)
  1572.    (:stack-trap #xAA5E paramblock asyncflag (1318 :signed-integer)))
  1573.  
  1574. ; $ENDC                         ;  UsingOCEMail 
  1575.  
  1576. ; $IFC NOT UsingIncludes
  1577.  
  1578. ; $ENDC
  1579.  
  1580. (export '($KMAILMODIFYMAILSLOT $KMAILCREATEMAILSLOT $KMSAMPUTRECIPIENTREPORT
  1581.           $KMSAMCREATEREPORT $KMSAMPUTBLOCK $KMSAMPUTENCLOSURE $KMSAMPUTCONTENT
  1582.           $KMSAMPUTRECIPIENT $KMSAMPUTATTRIBUTE $KMSAMPUTMSGHEADER $KMSAMSUBMIT
  1583.           $KMSAMENDNESTED $KMSAMBEGINNESTED $KMSAMCREATE $KMSAMMARKRECIPIENTS
  1584.           $KMSAMGETBLOCK $KMSAMENUMERATEBLOCKS $KMSAMGETENCLOSURE
  1585.           $KMSAMGETCONTENT $KMSAMGETRECIPIENTS $KMSAMGETATTRIBUTES
  1586.           $KMSAMNMARKRECIPIENTS $KMSAMGETMSGHEADER $KMSAMCLOSE $KMSAMOPENNESTED
  1587.           $KMSAMOPEN $KMSAMDELETE $KMSAMENUMERATE $KSMSAMSHUTDOWN
  1588.           $KSMSAMSTARTUP $KSMSAMSETUP $KMAILWAKEUPPMSAM $KPMSAMGETMSGSUMMARY
  1589.           $KPMSAMPUTMSGSUMMARY $KPMSAMCREATEMSGSUMMARY $KPMSAMSETSTATUS
  1590.           $KPMSAMLOGERROR $KPMSAMOPENQUEUES $KPMSAMGETMSAMRECORD
  1591.           $KMAILRESOLVEDLIST $KSMSAMFWDRMNMSERVERCHANGEDMASK
  1592.           $KSMSAMFWDRFOREIGNRLISCHANGEDMASK $KSMSAMFWDRCONNECTEDTOCHANGEDMASK
  1593.           $KSMSAMFWDRHOMEINTERNETCHANGEDMASK $KSMSAMFWDREVERYTHINGCHANGEDMASK
  1594.           $KSMSAMFWDRMNMSERVERCHANGEDBIT $KSMSAMFWDRFOREIGNRLISCHANGEDBIT
  1595.           $KSMSAMFWDRCONNECTEDTOCHANGEDBIT $KSMSAMFWDRHOMEINTERNETCHANGEDBIT
  1596.           $KSMSAMGETDYNAMICFWDRPARAMS $KSMSAMNOTIFYFWDRPWDCHANGE
  1597.           $KSMSAMNOTIFYFWDRNAMECHANGE $KSMSAMNOTIFYFWDRSETUPCHANGE
  1598.           $KMAILMAXPMSAMMSGSUMMARYDATA $KADDRESSEDAS_BCC $KADDRESSEDAS_CC
  1599.           $KADDRESSEDAS_TO $KMAILMSGSUMMARYVERSION $KPMSAMSTATUSSENT
  1600.           $KPMSAMSTATUSCACHING $KPMSAMSTATUSSENDING $KPMSAMSTATUSERROR
  1601.           $KPMSAMSTATUSPENDING $KMAILTIMERFREQUENCY $KMAILTIMERTIME
  1602.           $KMAILTIMEROFF $KMAILEPPCLOCATIONCHANGED $KMAILEPPCWAKEUP
  1603.           $KMAILEPPCDELETEOUTQMSG $KMAILEPPCMSGOPENED $KMAILEPPCINQUPDATE
  1604.           $KMAILEPPCADMIN $KMAILEPPCSCHEDULE $KMAILEPPCCONTINUE
  1605.           $KMAILEPPCSENDIMMEDIATE $KMAILEPPCMSGPENDING $KMAILEPPCMAILBOXCLOSED
  1606.           $KMAILEPPCMAILBOXOPENED $KMAILEPPCSHUTDOWN $KMAILEPPCDELETESLOT
  1607.           $KMAILEPPCMODIFYSLOT $KMAILEPPCCREATESLOT $KMAILEPPCMSGVERSION
  1608.           $KOCESETUPLOCATIONMAX $KOCESETUPLOCATIONNONE $KMAILFROMMARK
  1609.           $KMAILFROMLEOB $KMAILFROMSTART $KMAILNOMODEM $KMAILMISCERROR
  1610.           $KMAILMSAMERRORCODE $KMAILELEINFORMATIONAL $KMAILELEWARNING
  1611.           $KMAILELEERROR $KMAILELECORRECTABLE $KMAILMSAMACTIONSTRINGLISTID
  1612.           $KMAILMSAMERRORSTRINGLISTID $KMAILERRORLOGENTRYVERSION
  1613.           $KMAILMOVIESEGMENTTYPE $KMAILSTYLEDTEXTSEGMENTTYPE
  1614.           $KMAILSOUNDSEGMENTTYPE $KMAILPICTSEGMENTTYPE $KMAILTEXTSEGMENTTYPE
  1615.           $KMAILINVALIDSEGMENTTYPE $KMAILMOVIESEGMENTMASK
  1616.           $KMAILSTYLEDTEXTSEGMENTMASK $KMAILSOUNDSEGMENTMASK
  1617.           $KMAILPICTSEGMENTMASK $KMAILTEXTSEGMENTMASK $KMAILMOVIESEGMENTBIT
  1618.           $KMAILSTYLEDTEXTSEGMENTBIT $KMAILSOUNDSEGMENTBIT $KMAILPICTSEGMENTBIT
  1619.           $KMAILTEXTSEGMENTBIT $KMAILENCLOSEONNONRECEIPT $KMAILNOORIGINAL
  1620.           $KMAILORIGINALINREPORTMASK $KMAILNONRECEIPTREPORTSMASK
  1621.           $KMAILRECEIPTREPORTSMASK $KMAILFORWARDEDMASK $KMAILPRIORITYMASK
  1622.           $KMAILISREPORTWITHORIGINALMASK $KMAILISREPORTMASK
  1623.           $KMAILHASCONTENTMASK $KMAILHASSIGNATUREMASK $KMAILAUTHENTICATEDMASK
  1624.           $KMAILSENTMASK $KMAILSENTBIT $KMAILAUTHENTICATEDBIT
  1625.           $KMAILHASSIGNATUREBIT $KMAILHASCONTENTBIT $KMAILISREPORTBIT
  1626.           $KMAILISREPORTWITHORIGINALBIT $KMAILPRIORITYBIT $KMAILFORWARDEDBIT
  1627.           $KMAILRECEIPTREPORTSBIT $KMAILNONRECEIPTREPORTSBIT
  1628.           $KMAILORIGINALINREPORTBIT $KMAILINTRASHMASK $KMAILDONTARCHIVEMASK
  1629.           $KMAILREADMASK $KMAILINTRASHBIT $KMAILDONTARCHIVEBIT $KMAILREADBIT
  1630.           $KMAILISLOCALMASK $KMAILISLOCALBIT $KMAILBCCMASK $KMAILCCMASK
  1631.           $KMAILTOMASK $KMAILFROMMASK $KMAILSUBJECTMASK
  1632.           $KMAILCONVERSATIONIDMASK $KMAILREPLYIDMASK $KMAILMSGFAMILYMASK
  1633.           $KMAILNESTINGLEVELMASK $KMAILSENDTIMESTAMPMASK $KMAILLETTERIDMASK
  1634.           $KMAILMSGTYPEMASK $KMAILINDICATIONSMASK $KMAILLETTERFLAGSMASK
  1635.           $KMAILBCCBIT $KMAILCCBIT $KMAILTOBIT $KMAILFROMBIT $KMAILSUBJECTBIT
  1636.           $KMAILCONVERSATIONIDBIT $KMAILREPLYIDBIT $KMAILMSGFAMILYBIT
  1637.           $KMAILNESTINGLEVELBIT $KMAILSENDTIMESTAMPBIT $KMAILLETTERIDBIT
  1638.           $KMAILMSGTYPEBIT $KMAILINDICATIONSBIT $KMAILLETTERFLAGSBIT
  1639.           $KMAILFAMILYFILE $KMAILFAMILY $KMAILREPORTTYPE $KMAILHOPINFOTYPE
  1640.           $KMAILTUNNELLTRTYPE $KMAILMSAMTYPE $KMAILIMAGEBODYTYPE
  1641.           $KMAILENCLOSUREFILETYPE $KMAILENCLOSUREDESKTOPTYPE
  1642.           $KMAILENCLOSURELISTTYPE $KMAILCONTENTTYPE $KMAILLTRHDRTYPE
  1643.           $KMAILLTRMSGTYPE $KMAILAPPLEMAILCREATOR))
  1644. (provide-interface 'OCEMail)
  1645.